/**
 *
 * 医疗服务指标点击模块
 * @Date: 2016-1-25
 * @author: Jackson wang
 * @version: 1.0
 * @since: 1.0
 *
 */
 
 define(["jquery","sysmanMain","valueUtil","baseSupplyInfo","antiMedical","antiDose","overlayPrescribe","basePatient"],
		function($,sysmanMain,valueUtil,baseSupplyInfo,antiMedical,antiDose,overlayPrescribe,basePatient) {
	
			
	var config = {
		//dom根节点
		rootid : 'panel-chart-all div.supply-panel',
		
		//事件dom选择器
		selector: 'a.supply-indicate'
		
		
	}	
	
	var public_method = {
		
		/**
		 * @param _options.evt	事件对象
		 * @param _options.yearAndMonth	统计年月
		 */
		openPage:function(_options){
			if(window.console){
				console.info('supplyIndicate loaded and running ...')
			}
			var e = _options.evt
			if(e && e.currentTarget){
				var _t = e.currentTarget
				var _c = $(_t).attr('indicate');
				
				//供应商总数查询条件
				var all_sup_name = {
					is_used:'Y'
				}
				//申请审核供应商数量查询条件
				var apply_audit = {
					is_used : 'Y',
					status_ne: '1'
				}
				//通过审核供应商数量查询条件
				var pass_audit = {
					is_used:'Y',
					status:'1'
					
				}
				//基本信息不完备供应商查询条件
				var supply_baseinfo_num = {
					sqlid:"lack_supply_baseinfo"
				}
				var supply_archive_num={
					sqlid:"lack_supply_archive"
				}
				var supply_bad_info={
					sqlid:"supply_bad_info"
				}
				
				var oc = {
					monitor_year_month:_options.yearAndMonth,
					status:'1'
					
				}
				
				var ic = {
					monitor_year_month:_options.yearAndMonth
					
				}
				if(_c){
					switch(_c){
						case 'supply-num':
						//供应商总数
						private_method.openSupplyBaseInfo(all_sup_name);
						break;
						//申请审核供应商
						case 'supply-audit-num':
						private_method.openSupplyBaseInfo(apply_audit);
						break;
						//通过审核供应商数量
						case 'supply-permit-num':
						private_method.openSupplyBaseInfo(pass_audit);
						break;
						//基本信息不完备供应商
						case 'supply-baseinfo-num':
						private_method.openSQLForLackSupplyBaseInfo(supply_baseinfo_num);
						break;
						//档案不完备供应商
						case 'supply-archive':
						private_method.openSQLForLackArchiveInfo(supply_archive_num);
						break;
						//不良记录供应商
						case 'supply-bad-info':
						private_method.openSQLForBadInfo(supply_bad_info);
						break;
						default:
						private_method.openSQLForSupplyBaseInfo();
					}
				}
			}
		}
	}
	
	var private_method = {
		openOutpatientNum:function(_options){
			
		},
		//查询所有供应商基本信息、审核通过供应商信息、申请审核供应商信息
		openSupplyBaseInfo:function(_options){
			baseSupplyInfo.openPage(_options)			
		},
		openSQLForSupplyBaseInfo:function(_options){
			baseSupplyInfo.openSQLForSupplyBaseInfo(_options)
		},
		//供应商不良记录openPop方法
		openSQLForBadInfo:function(_options){
			baseSupplyInfo.openSQLForBadInfo(_options)
		},
		
		//供应商档案不全openPop方法
		openSQLForLackArchiveInfo:function(_options){
			baseSupplyInfo.openSQLForLackArchiveInfo(_options)
		},
		//供应商基本信息不全openPop方法openSQLForLackArchiveInfo
		openSQLForLackSupplyBaseInfo:function(_options){
			baseSupplyInfo.openSQLForLackSupplyBaseInfo(_options)
		}
	}
	return public_method;
})